package com.platform.qujia.dao;

import com.platform.qujia.pojo.AppUserInfo;
import com.platform.qujia.pojo.AppUserInfoExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface AppUserInfoMapper {


    public void increaseShareCount(@Param("userId") Long userId);
    public Integer getShareCountByUserId(@Param("userId") Long userId);
    //根据用户memberCode获取用户信息
    AppUserInfo getAppUserInfoByMemberCode(AppUserInfo appUserInfo);

    //更新用户积分
    void updateAppUserIntegral(AppUserInfo appUserInfo);

    //获取用户信息，该查询不返回用户电子卡余额
    AppUserInfo getAppUserInfoAndBalance(AppUserInfo appUserInfo);

    //根据手机号和油站获取用户信息
    List<AppUserInfo> selectAppUserInfoByMobilePhoneAndStationId(AppUserInfo appUserInfo);

    //获取用户信息
    AppUserInfo getAppUserInfo(AppUserInfo appUserInfo);

    //获取用户信息
    List<String> checkUserCoupon(AppUserInfo appUserInfo);

    /**
     * 判断使用小程序支付的用户是否关注公众号
     * @param map
     * @return
     */
    String whetherFollowGzh(Map map);

    /***
     * 判断该App用户是否已注册
     * @param map
     * @return
     */
    int isExistAppUser(Map map);


    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app_user_info
     *
     * @mbg.generated
     */
    int addAppUserInfo(AppUserInfo record);


    //更新unionID
    void updateAppUserInfo(AppUserInfo appUserInfo);

    void updateAppUserInfoByBlogOpenid(AppUserInfo appUserInfo);

    void updateAppUserInfoByUnionId (AppUserInfo appUserInfo);

    void updateAppUserInfoByUserId(AppUserInfo appUserInfo);

    //查询客户
    List<AppUserInfo> getUserInfo(AppUserInfo appUserInfo);

    List<AppUserInfo> selectAppUserInfoByStationId(Long stationId);

    AppUserInfo getById(Integer id);

    AppUserInfo getAppUserById(@Param("userId") Long appUserId);

    int deleteUserInfoById(Integer id);

    int updateById(AppUserInfo appUserInfo);

    AppUserInfo selectAppUserInfoById(Long userId);

    //根据手机号和油站获取用户信息
    List<AppUserInfo> getAppUserInfoByMobilePhoneAndStationId(AppUserInfo appUserInfo);

    int updatePasswordById(AppUserInfo appUserInfo);

    void updateYunHuaUserId(AppUserInfo appUserInfo);

    void updateYunHuaUserIdByPhone(AppUserInfo appUserInfo);

    int countByExample(AppUserInfo appUserInfo);

    List<AppUserInfo> queryPageByExample(@Param("userInfo") AppUserInfo userInfo, @Param("offset") int offset, @Param("limit") int limit);
}
